<template>
	<view class="">
		<bg-video></bg-video>
		<cu-custom bgColor="bg-main" :isBack="false">
			<block slot="content">{{navpagetitle[currentnav]}}</block>
		</cu-custom>
		<view :style="{paddingBottom:CustomBar + 'px'}">
			<md v-if="currentnav == 'md'"></md>
			<wd v-if="currentnav == 'wd'"></wd>
		</view>
		<view class="w-100 fixed bottom0 left0 bg-white">
			<view v-for="(nav, index) in navbars" :key="index" class="w-50 inline-block flex justify-center">
				<view @tap="currentnav = nav.tab" class="flex flex-direction text-main justify-center align-center padding-bottom-sm">
					<text class="text-sl">
						<text :class="currentnav == nav.tab ? nav.cla : nav.cl"></text>
					</text>
					<text :class="currentnav == nav.tab ? 'text-main' : 'text-black'">{{nav.title}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import md from "./md.vue";
	import wd from "./wd.vue";
	export default {
		components: {
			md,
			wd
		},
		data: function() {
			return {
				StatusBar: this.StatusBar,
				CustomBar: this.CustomBar,
				currentnav: "md",
				navpagetitle: {
					md: "门店",
					wd: "我的",
				},
				navbars: [
					{
						cl: "iconfont icon-shouye",
						cla: "iconfont icon-shouye-tianchong",
						tab: "md",
						title: "门店"
					},
					{
						cl: "iconfont icon-wode",
						cla: "iconfont icon-wode-tianchong",
						tab: "wd",
						title: "我的"
					},
				]
			}
		},
		onLoad: function(option) {
			if (option.tag) {
				this.currentnav = option.tag;
			}
		},
		onShow: function() {
			this.init();
		},
		onPullDownRefresh: function() {
			this.init();
			uni.stopPullDownRefresh();
		},
		methods: {
			init: function() {
			},
			
		}
	}
</script>

<style>
</style>